﻿using Model.Sys;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL.Sys;
namespace BLL.Sys
{
  public  class MenuBLL
    {
       MenuDAl dal = new MenuDAl();
      /// <summary>
        ///  根据角色id得到菜单
      /// </summary>
      /// <param name="id"></param>
      /// <returns></returns>
        public string GetMenuByRoleId(string id)
        {
           return dal.GetMenuByRoleId(id);
        }
      
      /// <summary>
        ///   根据菜单id得到菜单信息
      /// </summary>
      /// <param name="ids"></param>
      /// <returns></returns>
        public List<MenuModel> GetParentMenuByIds(string ids)
        {
            return dal.GetParentMenuByIds(ids);
        }
     
      /// <summary>
        /// 根据父级菜单id得到子级菜单
      /// </summary>
      /// <param name="ParentId"></param>
      /// <returns></returns>
        public List<MenuModel> GetSubMenuByParentId(string ParentId, string ids)
        {
            return dal.GetSubMenuByParentId(ParentId, ids);

        }
      /// <summary>
      /// 得到所有菜单信息
      /// </summary>
      /// <returns></returns>
        public List<ztreemodel> GetAllMenu() {
            return dal.GetAllMenu();
        }


    }
}
